<template>
  <GdDateTimePicker
    v-model="curBindVal"
    v-bind="allCompAttrs"
    v-on="allBindEvents"
  >
  </GdDateTimePicker>
</template>
<script>
export default {
  inheritAttrs: false,
  name:"DismensionGdDateTimePicker"
};
</script>
<script setup>
import { computed, watch, inject } from "vue";
import GdDateTimePicker from "@gd-accbuild-ui/gd-ui/gd-date-time-picker/gd-date-time-picker.vue";
import useComponentAttrs, { embeddedAtomicCompProps } from "../../useComponentAttrs";
import useComponentEvents from "../../useComponentEvents";

const props = defineProps({
  ...embeddedAtomicCompProps,
});

//组件所有属性的默认值映射
const compAttrsKeyDefaultValueMapping = {
  style: {},
  type: "datetime",
  placeholder: "",
  startPlaceholder: "开始",
  endPlaceholder: "结束",
  format: "YYYY-MM-DD HH:mm:ss",
  //defaultValue
  rangeSeparator: "-",
  defaultTime: undefined,
  valueFormat: undefined,
  clearable: false,
  teleported: false,
  //继承属性
  size: "default",
  readonly: false,
  disabled: false,
};
//组件属性继承属性的key
const compAttrsInheritedAttrKeys = ["size", "readonly", "disabled"];

//TODO:FIXME: 2022-09-06 明天继续  useComponentAttrs 这里的 curBindVal 需要根据groupInfo:{key:'searchPath.key',isReplacePartShow} //推荐新加一个计算属性
const { curBindVal, containerType, allCompAttrs } = useComponentAttrs({
  props,
  compAttrsKeyDefaultValueMapping,
  compAttrsInheritedAttrKeys,
});
const allBindEvents = useComponentEvents(props, curBindVal);
</script>
<style lang="scss" scoped></style>
